kanzi::Domain Class Reference

Domain binds Kanzi subsystems and objects together. More...

#include <kanzi/core.ui/domain/domain.hpp>

Inheritance diagram for kanzi::Domain:
kanzi::Object kanzi::MetaObject kanzi::PropertyObject

Public Member Functions

KzcMemoryManagergetMemoryManager () const
 
RenderergetRenderer () const
 
Renderer3DgetRenderer3D () const
 
ResourceManagergetResourceManager () const
 
ResourceLoaderFactorygetResourceLoaderFactory () const
 
KzuMessageDispatchergetMessageDispatcher () const
 
TaskDispatchergetTaskDispatcher () const
 Returns the task dispatcher of this domain. More...
 
InputManagergetInputManager () const
 
FocusManagergetFocusManager () const
 Returns the domain's focus manager. More...
 
KzuTaskSchedulergetTaskScheduler () const
 
KzuTextRenderer * getTextRenderer () const
 
ObjectFactorygetObjectFactory () const
 
ObjectLoadergetObjectLoader () const
 
TimelineClockSharedPtr getRootTimelineClock () const
 
PreviewTimelinePlaybackSharedPtr getPreviewTimelinePlayback () const
 
CompositionManagergetCompositionManager () const
 
void setCompositionManager (unique_ptr< CompositionManager > compositionManager)
 Set composition manager. More...
 
ScriptingSystemSharedPtr getScriptingSystem () const
 
void setScriptingSystem (ScriptingSystemSharedPtr scriptingSystem)
 
void registerModule (string_view moduleName, shared_ptr< Module > module)
 Register a Module and the metadata it contains. More...
 
template<typename TModule >
void registerModule (string_view moduleName)
 
ModulegetModule (string_view moduleName)
 Get Module instance by the name it is registered with. More...
 
void loadPlugin (string_view moduleName)
 
void enableEditing (bool enable)
 Enables or disables editing mode. More...
 
bool isEditingEnabled () const
 
void createPreviewTimeline ()
 Create preview timeline context. More...
 
void destroyPreviewTimeline ()
 Destroy preview timeline context. More...
 
MainLoopTaskProfilerRegistrygetMainLoopTaskProfilerRegistry ()
 To get main loop task profiler registry use, getMainLoopTaskProfilerRegistry(). More...
 
- Public Member Functions inherited from kanzi::Object
 Object (Domain *domain)
 
virtual ~Object ()
 
DomaingetDomain () const
 Returns the domain the object belongs to. More...
 
KzuTaskSchedulergetTaskScheduler () const
 Returns the task scheduler of the object. More...
 
KzuMessageDispatchergetMessageDispatcher () const
 Returns the message dispatcher of the object. More...
 
ResourceManagergetResourceManager () const
 Returns the resource manager of the object. More...
 
virtual const MetaclassgetDynamicMetaclass () const KZ_OVERRIDE
 Returns the metaclass of the dynamic type of the object. More...
 
AppliedStyleEntrySharedPtr applyObjectStyle (kanzi::StyleSharedPtr style)
 Applies a style to an object. More...
 
void unapplyObjectStyle (AppliedStyleEntrySharedPtr appliedStyleEntry)
 
void applyObjectStyles ()
 Apply all styles for an object node. More...
 
void unapplyObjectStyles ()
 Unapplies and removes all applied styles. More...
 
- Public Member Functions inherited from kanzi::MetaObject
virtual ~MetaObject ()
 
bool isTypeOf (const Metaclass *objectType) const
 Determines if the type of this object is the given type or derived from it. More...
 
- Public Member Functions inherited from kanzi::PropertyObject
 PropertyObject ()
 
virtual ~PropertyObject ()
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 Sets the local value of a property. More...
 
void removeKzbProperties ()
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property. More...
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value. More...
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers. More...
 
template<typename DataType >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractPropertyBase (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
void setPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
bool isPropertyFlagSet (AbstractPropertyType propertyType, uint32_t flag) const
 
void clearPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value. More...
 
bool hasBaseValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value, disregarding modifiers. More...
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property. More...
 
bool hasNonClassValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a value of any precedence higher than class default value set for the property. More...
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property. More...
 
void copyLocalValue (const PropertyObject &other, AbstractPropertyType propertyType)
 Copies local value of single property from another object. More...
 
void copyLocalValues (const PropertyObject &other)
 Copies all local values from another object. More...
 
virtual void onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason)
 Virtual function to handle property change notifications. More...
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, void *owner)
 
template<typename DataType >
void removePropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *owner)
 
template<typename DataType >
void addPropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void removePropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
void validatePropertyModifiers (AbstractPropertyType propertyType)
 
template<typename DataType >
void addPropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void removePropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
size_t getPropertyNotificationHandlerCount (const PropertyType< DataType > &propertyType)
 Gets number of current notification handlers for given property type. More...
 

Static Public Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
static Domaincreate (KzcMemoryManager *memoryManager)
 
static void destroy (Domain *domain)
 
- Static Public Member Functions inherited from kanzi::Object
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info. More...
 
- Static Public Member Functions inherited from kanzi::MetaObject
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info. More...
 

Static Public Attributes

Properties
static PropertyType< bool > HalfFloatTextureFormatProperty
 HalfFloatTextureFormat property. More...
 
static PropertyType< bool > HalfFloatTextureFormatLinearProperty
 HalfFloatTextureFormatLinear property. More...
 
static PropertyType< bool > HalfFloatColorAttachmentProperty
 HalfFloatColorAttachment property. More...
 
static PropertyType< bool > RenderToMipmapLevelsProperty
 RenderToMipmapLevels property. More...
 
static PropertyType< bool > ExternalTextureProperty
 ExternalTexture property. More...
 
static PropertyType< string > ProjectPluginReferencesProperty
 ProjectPluginReferences property. More...
 
static PropertyType< string > StartupScreenProperty
 StartupScreen property. More...
 
static PropertyType< bool > StateToolsEditStateEnabledProperty
 StateToolsEditStateEnabled property. More...
 
static PropertyType< ColorRGBAPreviewWindowBackgroundColorProperty
 PreviewWindowBackgroundColor property. More...
 
static PropertyType< int > MessageLimitPerFrameProperty
 MessageLimitPerFrame property. More...
 

Static Protected Member Functions

static kzsError timelineClockTask (kzUint deltaTime, void *userData, kzBool *out_done)
 

Additional Inherited Members

- Public Types inherited from kanzi::PropertyObject
typedef intrusive_ptr< AbstractPropertyTypeDescriptor::PropertyStoragePropertyStoragePtr
 
typedef vector< PropertyStoragePtrPropertyStorageContainer
 
typedef PropertyStorageContainer::iterator PropertyStorageIterator
 
typedef PropertyStorageContainer::const_iterator PropertyStorageConstIterator
 
typedef PropertyStorageContainer::reverse_iterator PropertyStorageReverseIterator
 
- Protected Types inherited from kanzi::Object
typedef vector< AppliedStyleEntrySharedPtrAppliedStyleContainer
 Applied style container. More...
 
- Protected Member Functions inherited from kanzi::Object
void initialize ()
 
void onCopy (const Object &other)
 
- Protected Member Functions inherited from kanzi::MetaObject
 MetaObject ()
 
void initialize ()
 
- Protected Member Functions inherited from kanzi::PropertyObject
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, void *owner)
 
void removePropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, void *owner)
 
AbstractPropertyTypeDescriptor::ValueSourceEntrygetTopValueSourceEntry (AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage) const
 
AbstractPropertyTypeDescriptor::ValueSourceEntrygetTopValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetTopValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetNonClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourceEntryfindLocalValueSourceEntry (AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::ValueSourceEntryconstructLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::ValueSourceEntryacquireLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::PropertyStoragefindPropertyStorage (AbstractPropertyTypeDescriptor &descriptor) const
 
PropertyStoragePtr findPropertyStoragePtr (AbstractPropertyTypeDescriptor &descriptor) const
 Gets property storage intrusive pointer that can be used to hold a reference until end of operation. More...
 
PropertyStoragePtr constructPropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
PropertyStoragePtr acquirePropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::ModifierStorageacquireModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::ModifierStoragefindModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStorageacquireNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStoragefindNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByUnqualifiedNameAndDataType (string_view unqualifiedName, PropertyDataType dataType)
 
void validatePropertyModifiersAndNotifyHandlers (PropertyStoragePtr &propertyStorage)
 
void copyLocalValue (const AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 Copy local value from property storage. More...
 
PropertyStorageContainer::iterator beginPropertyStorage ()
 
PropertyStorageContainer::iterator endPropertyStorage ()
 
virtual void notifyPropertyHandlers (PropertyStoragePtr &propertyStorage, PropertyNotificationReason reason)
 
void onCopy (const PropertyObject &other)
 
- Protected Attributes inherited from kanzi::Object
AppliedStyleContainer m_appliedStyles
 Listing of applied styles applied to this object. More...
 

Detailed Description

Domain binds Kanzi subsystems and objects together.

All objects and subsystems in Kanzi are associated with a domain when created. Objects in the same domain share access to the same subsystems. Objects from different domains cannot be used together.

Member Function Documentation

static PropertyTypeEditorInfoSharedPtr kanzi::Domain::makeEditorInfo ( )
inlinestatic
static Domain* kanzi::Domain::create ( KzcMemoryManager memoryManager)
static
static void kanzi::Domain::destroy ( Domain domain)
static
KzcMemoryManager* kanzi::Domain::getMemoryManager ( ) const
Renderer* kanzi::Domain::getRenderer ( ) const
Renderer3D* kanzi::Domain::getRenderer3D ( ) const
ResourceManager* kanzi::Domain::getResourceManager ( ) const
ResourceLoaderFactory* kanzi::Domain::getResourceLoaderFactory ( ) const
KzuMessageDispatcher* kanzi::Domain::getMessageDispatcher ( ) const
TaskDispatcher* kanzi::Domain::getTaskDispatcher ( ) const

Returns the task dispatcher of this domain.

You can use the task dispatcher returned by this function to dispatch tasks that the system will execute on the thread of this domain.

See also
TaskDispatcher
InputManager* kanzi::Domain::getInputManager ( ) const
FocusManager* kanzi::Domain::getFocusManager ( ) const

Returns the domain's focus manager.

Returns
The focus manager of the domain.
KzuTaskScheduler* kanzi::Domain::getTaskScheduler ( ) const
KzuTextRenderer* kanzi::Domain::getTextRenderer ( ) const
ObjectFactory* kanzi::Domain::getObjectFactory ( ) const
ObjectLoader* kanzi::Domain::getObjectLoader ( ) const
TimelineClockSharedPtr kanzi::Domain::getRootTimelineClock ( ) const
PreviewTimelinePlaybackSharedPtr kanzi::Domain::getPreviewTimelinePlayback ( ) const
CompositionManager* kanzi::Domain::getCompositionManager ( ) const
void kanzi::Domain::setCompositionManager ( unique_ptr< CompositionManager compositionManager)

Set composition manager.

Will take ownership of composition manager passed.

Parameters
compositionManagerNew composition manager.
ScriptingSystemSharedPtr kanzi::Domain::getScriptingSystem ( ) const
void kanzi::Domain::setScriptingSystem ( ScriptingSystemSharedPtr  scriptingSystem)
void kanzi::Domain::registerModule ( string_view  moduleName,
shared_ptr< Module module 
)

Register a Module and the metadata it contains.

template<typename TModule >
void kanzi::Domain::registerModule ( string_view  moduleName)
inline
Module* kanzi::Domain::getModule ( string_view  moduleName)

Get Module instance by the name it is registered with.

void kanzi::Domain::loadPlugin ( string_view  moduleName)
void kanzi::Domain::enableEditing ( bool  enable)
inline

Enables or disables editing mode.

Preview timeline will be created or destroyed depending on whether editing is enabled or not..

bool kanzi::Domain::isEditingEnabled ( ) const
inline
void kanzi::Domain::createPreviewTimeline ( )

Create preview timeline context.

void kanzi::Domain::destroyPreviewTimeline ( )

Destroy preview timeline context.

MainLoopTaskProfilerRegistry& kanzi::Domain::getMainLoopTaskProfilerRegistry ( )
inline

To get main loop task profiler registry use, getMainLoopTaskProfilerRegistry().

Returns
The reference to the main loop task profiler registry.
static kzsError kanzi::Domain::timelineClockTask ( kzUint  deltaTime,
void *  userData,
kzBool out_done 
)
staticprotected

Member Data Documentation

PropertyType<bool> kanzi::Domain::HalfFloatTextureFormatProperty
static

HalfFloatTextureFormat property.

The default value is false.

See also
setHalfFloatTextureFormat(), isHalfFloatTextureFormat()
PropertyType<bool> kanzi::Domain::HalfFloatTextureFormatLinearProperty
static

HalfFloatTextureFormatLinear property.

The default value is false.

See also
setHalfFloatTextureFormatLinear(), isHalfFloatTextureFormatLinear()
PropertyType<bool> kanzi::Domain::HalfFloatColorAttachmentProperty
static

HalfFloatColorAttachment property.

The default value is false.

See also
setHalfFloatColorAttachment(), isHalfFloatColorAttachment()
PropertyType<bool> kanzi::Domain::RenderToMipmapLevelsProperty
static

RenderToMipmapLevels property.

The default value is false.

See also
setRenderToMipmapLevels(), isRenderToMipmapLevels()
PropertyType<bool> kanzi::Domain::ExternalTextureProperty
static

ExternalTexture property.

The default value is false.

See also
setExternalTexture(), isExternalTexture()
PropertyType<string> kanzi::Domain::ProjectPluginReferencesProperty
static

ProjectPluginReferences property.

The default value is "".

See also
setProjectPluginReferences(), getProjectPluginReferences()
PropertyType<string> kanzi::Domain::StartupScreenProperty
static

StartupScreen property.

The default value is "".

See also
setStartupScreen(), getStartupScreen()
PropertyType<bool> kanzi::Domain::StateToolsEditStateEnabledProperty
static

StateToolsEditStateEnabled property.

The default value is false.

See also
setStateToolsEditStateEnabled(), isStateToolsEditStateEnabled()
PropertyType<ColorRGBA> kanzi::Domain::PreviewWindowBackgroundColorProperty
static

PreviewWindowBackgroundColor property.

The default value is ColorRGBA(0.0f, 0.0f, 0.0f, 0.0f).

See also
setPreviewWindowBackgroundColor(), getPreviewWindowBackgroundColor()
PropertyType<int> kanzi::Domain::MessageLimitPerFrameProperty
static

MessageLimitPerFrame property.

The default value is 1000.

See also
setMessageLimitPerFrame(), getMessageLimitPerFrame()

The documentation for this class was generated from the following file: